-
Notifications
You must be signed in to change notification settings - Fork 45
Store PRegSet in MachineEnv
#254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store PRegSet in MachineEnv
#254
Conversation
Helps to make the `MachineEnv`s in Wasmtime `const`-allocatable.
cfallin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a bunch for working on this!
Use `offset_hint` as a mask start rather than looking for the Nth bit set. Should in theory have the same overall desired balancing semantics but enables more bit-tricks.
cfallin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Test tweak but otherwise LGTM.
src/lib.rs
Outdated
| let p0 = PReg::new(0, Int); | ||
| let p1 = PReg::new(1, Int); | ||
| let p2 = PReg::new(2, Int); | ||
| let p3 = PReg::new(3, Int); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we tweak these test values to exist in the various limbs?
64 regs per class, and class is put in the upper bits, and limbs are 64 bits each, so maybe something like (0, Int), (5, Float), (23, Vector), (63, Vector) or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Pushed up with some more tests, but if you're thinking of other kinds of tests I'm happy to add more too
cfallin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
If you want to do a version-bump PR (this is a semver break so 0.14.0 would be next) I'm happy to merge and then do a release (over here in RA2-land I just |
Helps to make the
MachineEnvs in Wasmtimeconst-allocatable.Closes #252